﻿@model Teacher
<form class="form-horizontal uiform" method="post"
      data-modal="true"
      data-table=".uitable"
      data-error-el=".alert-danger"
      data-on-submit-success="fx.mtfSuccess"
      action="@Url.Action("Save")">
    <div class="modal-header">
        <button class="close" data-dismiss="modal" type="button" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">@Html.EditStatus("教师")</h4>
    </div>
    <div class="modal-body">
        @Html.AntiForgeryToken()
        @Html.MarkCreate()
        @Html.HiddenFor(p => p.Id)
        @Html.HiddenFor(p => p.CreateDateTime)
        <div class="alert alert-danger fxhide"></div>
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                教师姓名：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.Name)" value="@Model.Name"
                       data-validate="required: true,maxlength: 10"
                       data-validate-message="required:'请输入教师姓名'"
                       type="text" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                教师编号：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.Code)" value="@Model.Code"
                       data-validate="required: true,maxlength: 20"
                       data-validate-message="required:'请输入教师编号'"
                       type="text" autocomplete="off" />
            </div>
        </div>
        
        @*<div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                性别：
            </label>
            <div class="col-md-8">
                <select class="form-control uiselect" name="@nameof(Model.Sex)"
                        data-text-field="@nameof(Model.Sex)"
                        data-validate="required: true"
                        data-validate-message="required:'请选择性别'">
                    <option value="男" @Html.IsSelected(Model.Sex?.Equals("男"))>男</option>
                    <option value="女" @Html.IsSelected(Model.Sex?.Equals("女"))>女</option>
                </select>
            </div>
        </div>*@
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                身份证号码：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.IdNumber)" value="@Model.IdNumber"
                       data-validate="required: true,maxlength: 18"
                       data-validate-message="required:'请输入身份证号码'"
                       type="text" autocomplete="off" />
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                <span class="required"> * </span>
                培训机构：
            </label>
            <div class="col-md-8">
                <select class="form-control uiselect" name="@nameof(Model.SchoolId)"
                        data-text-field="@nameof(Model.SchoolName)"
                        data-validate="required: true"
                        data-validate-message="required:'请选择培训机构'">
                    @Html.SchoolOption(Model.SchoolId)
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">
                手机号码：
            </label>
            <div class="col-md-8">
                <input class="form-control" name="@nameof(Model.Phone)" value="@Model.Phone"
                       data-validate="minlength: 6,maxlength: 11,digits:true"
                       type="text" autocomplete="off" />
            </div>
        </div>
        @*<div class="form-group">
                <label class="control-label col-md-3">
                    备注：
                </label>
                <div class="col-md-8">
                    <textarea class="form-control" name="@nameof(Model.Note)" rows="3">@Model.Note</textarea>
                </div>
            </div>*@
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" type="submit">
            <i class="fa fa-save"></i> 保存
        </button>
        <button class="btn btn-default" type="button" data-dismiss="modal">
            <i class="fa fa-sign-in"></i> 关闭
        </button>
    </div>
</form>